package com.fitso.model.calculator.idealweight;

import com.fitso.model.bean.Body;
import com.fitso.model.bean.Body.Sex;
import com.fitso.model.bean.measure.length.Foot;
import com.fitso.model.bean.measure.length.Length;
import com.fitso.model.bean.measure.mass.KiloGram;
import com.fitso.model.bean.measure.mass.Mass;
import com.fitso.model.calculator.IdealWeightCalculator;

/**
 * Implementation of {@link IdealWeightCalculator} that starts at a higher
 * weight but has a shallower slope than Devine or Robinson. This calculation is
 * a good middle ground for men and women but is impossibly difficult and
 * dangerous for tall men.
 * 
 * @author timothystorm
 */
public class MillerIdealWeightCalculator extends AbstractIdealWeightCalculator implements IdealWeightCalculator {

	protected Mass getWeightMultiplier(Body body) {
		return new KiloGram(body.getSex() == Sex.MALE ? 1.41 : 1.36);
	}

	protected Mass getRootWeight(Body body) {
		return new KiloGram(body.getSex() == Sex.MALE ? 56.2 : 53.1);
	}

	protected Length getMedianHeight(Body body) {
		return new Foot(5.0);
	}
}
